//
//  AddressVC.swift
//  DollarBuy
//
//  Created by 郑东喜 on 2016/11/8.
//  Copyright © 2016年 郑东喜. All rights reserved.
//  收获地址测试界面

import UIKit

class AddressVC: UITableViewController {
    

    let cellIdentifier = "myCell"
    
    var tableData: [String] = ["BMW", "Ferrari", "Lambo"]

    
    override func viewDidLoad() {
        super.viewDidLoad()

        let cellNib = UINib(nibName: "AddressCell", bundle: nil)
        tableView.register(cellNib, forCellReuseIdentifier: "cell")
        
        self.title = "我的收获地址"
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        print(tableData.count)
        return 1
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 3
    }

    override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 100
    }

    
    //创建各单元显示内容(创建参数indexPath指定的单元）
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell: AddressCell = self.tableView.dequeueReusableCell(withIdentifier: "cell") as! AddressCell

        return cell
    }
}
